<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../css/bof.css" />
</head>
<body>

<div id="playercontainer"></div>
<div class="movie-info-box">
	<div id="movieview">
		<ul id="dramalist" class="movie-num-list">


                <!-- <li class="">
                    <span data-vindex="0" class="all-line icon-yug"></span>
                        嗡嗡嗡嗡嗡
                </li> -->

        </ul>
	</div>
</div>

</body>
<script type="text/x-dot-template" id="template">
{{~ it : value : index }}
    <li class="" onclick="huanJi('{{= value. url }}')">
        <span class="all-line icon-yug"></span>
            {{= value. title }}
    </li>
{{~}}
</script>
<script type="text/javascript" src="../script/api.js" ></script>
<script type="text/javascript" src="../script/doT.js"></script>
<script src="../script/cyberplayer.js"></script>
<script src="../script/video.min.js"></script>
<script src="../script/videojs-contrib-hls.min.js"></script>
<script src="../script/videojs-contrib-quality-levels.min.js"></script>

<script type="text/javascript">
  var api_url = localStorage.getItem('api_url');
  apiready = function(){
    //alert(api.pageParam.video)

    // api.ajax({
    //     url: 'http://www.ibb6.com/jx/list/',
    //     method: 'get',
    //     data: {
    //         values: {
    //             url: api.pageParam.url
    //         }
    //     }
    // },function(ret, err){
    //     if (ret) {
    //       var div_list = $api.byId('dramalist');
    //       var template = $api.byId('template');
    //
    //       var pagefn = doT.template(template.text);
    //       div_list.innerHTML = pagefn(ret);
    //         //alert( JSON.stringify( ret ) );
    //     } else {
    //         //alert( JSON.stringify( err ) );
    //     }
    // });




    api.addEventListener({
        name: 'keyback'
    }, function(ret, err) {
      api.setScreenOrientation({
          orientation: 'portrait_up'
      });
      api.closeWin();
    });


    // var player = cyberplayer("playercontainer").setup({
    //     width: api.winWidth-20,
    //     height: 200,
    //     file: api.pageParam.video,
    //     controlbar: {
    //         barLogo: false
    //     },
    //     autostart: true,
    //     stretching: "uniform",
    //     volume: 100,
    //     controls: true,
    //     ak: "dfd6c7951d4c477bb2555496c8e97166"
    // });

    var player = cyberplayer("playercontainer").setup({
        width: api.winWidth-20,
        height: 200,
        file: api.pageParam.video,
        playRate: true, // 默认h5播放器有倍速功能，如不需要，可以设置为false
        // 可配置倍速值数组，格式如下所示
        playRateConfig: [
            {label: "×1"},
            {label: "×2"},
            {label: "×3"},
            {label: "×4"},
        ],
        autostart: true,
        startParam : "start",
        stretching: "uniform",
        volume: 100,
        controls: true,
        controlbar: {
            barLogo: false, // 进度条上的logo显示与否,默认true
            canDrag: true, // 进度条是否允许拖动,默认true
        },
        skin: {
            name: "seven", // 默认皮肤-bce，其他可选项有beelden, bekle, five, glow, roundster, seven, six, stormtrooper, vapor
            background: "#484848", // 背景色设置
            inactive: "#FFF", // 未激活时的颜色
            active: "#FFF", // 悬浮或激活的严责
        },
        ak: "dfd6c7951d4c477bb2555496c8e97166" // 公有云平台注册即可获得accessKey
    });

    player.play();

    player.on('fullscreen', function (ret) {
         //alert( JSON.stringify( ret ) );
         if (ret.fullscreen) {
           api.setScreenOrientation({
               orientation: 'landscape_right'
           });
         }else {
           api.setScreenOrientation({
               orientation: 'portrait_up'
           });
         }
    });


  }






</script>
</html>
